<?php

include ("library/function.php");
include ("library/Db.class.php");

is_login();
$db = new DB();
$pid = $_GET["pid"];

$sql = "select * from mr_post where post_type = 2 and pid = :pid ORDER BY addtime DESC limit 2";
$forward = $db->query($sql,array("pid"=>$pid));
foreach ($forward as $vo){
    $vo["avatar"] = $db->single("select avatar from mr_user where id = :user_id",array("user_id"=>$vo["user_id"]));
    $list[] = $vo;
}
$total_forward = $db->single("select count(*) from mr_post where post_type = 2 and pid = :pid ",array("pid"=>$pid));

include "view/forward-layer.php";

